<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8"  />
		<title></title>
		<link rel="stylesheet" type="text/css" href="/static/share/css/my.css">
		<script type="text/javascript" src="/static/share/js/jquery.min.js"></script>
	</head>
	<body>
		<div id="mask" style="display:none" class="mask" onclick="hideMask()">
			<img src="/static/share/img/44.png" >
		</div>
		<img class="logo" src="/static/share/img/logo.png" >
		<div class="title">云盟商桥</div>
		<img class="text-img" src="/static/share/img/text.png" >
		<div class="des">更多商品  尽在云盟商桥</div>
		<div type="button" id="shopBtn" class="btn-1" onclick="shopBtn()">打开商城</div>
		<div type="button" id="downloadBtn" class="btn-2" onclick="downloadBtn()">下载APP</div>
		<input type="hidden" name="url" value="{$url}">
		<input type="hidden" name="id" value="{$id}">

	</body>
</html>
<script type="text/javascript">
    // var url=$("input[name='url']").val();
    // var id=$("input[name='id']").val();


    function shopBtn(){
		// console.log('click shopBtn')
        location.href ="http://myun.youpilive.com/";//h5访问地址
		// alert ('暂未开放 请下载APP')
		// downloadBtn();
	};

    if(window.location.hash.includes('download')){
        // location.href =url;//app的下载地址
        // location.href ="http://localhost:8099/api/index/DownLoadApk";//app的下载地址
        location.href ="http://yun.youpilive.com/api/index/DownLoadApk";//app的下载地址
		// console.log(url)
    }

	function downloadBtn(){
         // var url=$("input[name='url']").val();


        //获取url地址
        // console.log(url)
		var ua = navigator.userAgent.toLowerCase();
		var isWeixin = ua.indexOf('micromessenger') != -1;
		if (!isWeixin) {
			location.href = 'xinweifashion://';//app的 url scheme
            setTimeout(function () {
//                     location.href = 'https://android.myapp.com/myapp/detail.htm?apkName=tv.xinwei.xinweifashion';//app的下载地址
//                     location.href = "http://localhost:8099/api/index/DownLoadApk";//app的下载地址
                    location.href = "http://yun.youpilive.com/api/index/DownLoadApk";//app的下载地址
               
            }, 1000);
		}else{
            window.location.hash="download";  //替换地址栏
            $("#mask").show()
		}
		console.log('click downloadBtn')
	};
	function hideMask(){
		$("#mask").hide()
	}
</script>